<div ng-controller="contractListCaibaoCtrl">
    <div class="table-header mt5 clearfix ng-scope">
        <span class="fl lh30 f14">釆宝管理</span>
    </div>
    <div class="section-table mt20">
        <div class="table-header lh30 pb5 clearfix">
            <span class="fl lh30 f14">釆宝列表</span>

            <div class="fr btn-group" ng-init="downloadUrl=''">
                <span class="fl">生效日期：</span>
                <input type="text" class="fl input-text w120 ml3 input-date" ng-model="query.beginInputDate"
                       ng-enter="query.execute()" ui-date format="yyyy-MM-dd">
                <span class="fl ml3">-</span>
                <input type="text" class="fl input-text w120 ml3 input-date" ng-model="query.endInputDate"
                       ng-enter="query.execute()" ui-date format="yyyy-MM-dd">
                <a class="btn" href="javascript: void(0)" ng-click="query.execute()">查询</a>

                <a class="btn btn-yellow" href="javascript: void(0)" ng-click="export(false)">导出excel</a>
            </div>
        </div>

        <div id="grid" class="table-wrap mt10">
            <table width="100%" class="valign-t">
                <thead>
                <tr>
                    <th width="35">序号</th>
                    <th width="190">合同信息</th>
                    <th width="140">生效日期</th>
                    <th width="140">期初采宝余额</th>
                    <th width="140">本月充值总额</th>
                    <th width="140">本月消耗总额</th>
                    <th width="140">期末采宝余额</th>
                    <th width="140">导出充值明细</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="record in contracts">
                    <td height="40"><p ng-bind="$index + 1 + startPageIndex"></p></td>
                    <td>
                        <a ng-href="/contract/edit_caibao.shtml#/base?id={{record.contract_id}}&contractType={{record.business_type_name}}" target="_blank" class="clearfix"
                           title="查看合同信息"><p ng-bind="record.contract_code"></p></a>

                    </td>
                    <td>
                        <p class="c-gray">{{record.sign_date | strdate: 'yyyy-MM-dd'}}</p>
                    </td>
                    <td>
                        <p>{{record.begin_remain_amount | number}}</p>
                    </td>
                    <td>
                        <p>{{record.this_month_recharge_amount | number}}</p>
                    </td>
                    <td>
                        <p>{{record.this_month_consume_amount | number}}</p>
                    </td>
                    <td>
                        <p>{{record.end_remain_amount | number}}</p>
                    </td>
                    <td>
                        <a href="javascript: void(0)" ng-click="export(record.contract_id)">导出充值明细excel</a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="no-data" style="display:none"><span>暂无数据</span></div>
        </div>
        <div id="pagination" class="pagination"></div>
    </div>
</div>
